var ShaderManager = Class.extend({
	init: function() {
		this.shaderRegistry = [];
	},
	
	registerShader: function(context, shaderName, vertexShaderSource, fragmentShaderSource) {
		this.shaderRegistry[shaderName] = new Shader(context, vertexShaderSource, fragmentShaderSource);
	},
	
	getShader: function(shaderName) {
		var shader = this.shaderRegistry[shaderName];
		if (!shader) {
			throw new Error("Undefined shader: " + shaderName);
		}
		return shader;
	},
}); 
